package ooday03;

import ooday03.ZooPro.Chicken;
import ooday03.ZooPro.Dog;
import ooday03.ZooPro.Fish;

public class Test {
    public static void main(String[] args) {
//        Dog[] dogs=new Dog[3];
//        dogs[0]=new Dog("Tom","black",15);
//        dogs[1]=new Dog("Alice","white",5);
//        dogs[2]=new Dog("Eddy","red",4);
//        System.out.println(dogs[0].name);
//        dogs[1].age=3;
//        dogs[2].swim();
//        for (int i = 0; i < dogs.length; i++) {
//            System.out.println(dogs[i].name+" ");
//            dogs[i].drink();
//            dogs[i].eat();
//        }
//        Chicken[] chick=new Chicken[3];
//        chick[0]=new Chicken("Clock","Yellow",2);
//        chick[1]=new Chicken("Dog","Brown",3);
//        chick[2]=new Chicken("Gala","Golden",1);
//        System.out.println(chick[1].name);
//        for (int i = 0; i < chick.length; i++) {
//            System.out.println(chick[i].age);
//            chick[i].layEggs();
//            chick[i].drink();
//        }
//        Fish[] fish=new Fish[3];
//        fish[0]=new Fish("Emily","purple",2);
//        fish[1]=new Fish("Fred","green",1);
//        fish[2]=new Fish("Grace","grey",3);
//        for (int i = 0; i < fish.length; i++) {
//            System.out.println(fish[i].name);
//            fish[i].swim();
//        }
        Dog d=new Dog("Killy","Black",2);
        System.out.println(d.name);
        d=null;
        System.out.println(d);
    }
}
